{% extends 'core/base.html' %}

{% block title %}
  Регистрация
{% endblock %}

{% block content %}
  <div class="w-1/2 my-6 mx-auto p-6 bg-gray-100 border border-gray-300 rounded-xl">
    <h1 class="mb-6 text-3xl">Регистрация</h1>
    <form method="post" action=".">
      {% csrf_token %}

      {% for fild in form %}
        <div class="mb-3 d-flex justify-content-center">
          <label class="inline-block mb-2">{{ fild }}</label><br />
        </div>
      {% endfor %}

      {% if form.errors or form.non_field_errors %}
        <div class="mb-3 p-6 bg-red-100 rounded-xl">
          {% for field in form %}
            {{ field.errors }}
          {% endfor %}

          {{ form.non_field_errors }}
        </div>
      {% endif %}

      <button class="px-6 py-3 text-lg font-semibold bg-green-700 text-white rounded-xl hover:bg-green-600">Регистрация</button>
    </form>
  </div>
{% endblock %}
